<template>
  <el-dialog
    class="notice_dialog"
    :model-value="modelValue"
    title="房间公告"
    style="width: 343px; height: auto !important"
    draggable
    :modal="false"
    :append-to-body="true"
    show
    @update:model-value="handleClose"
  >
    <template #header="{ close, titleId, titleClass }">
      <div class="custom_header">
        <span>房间公告</span>
      </div>
    </template>
    <div class="locked_content">
      <div>点歌：红欲米直接支付即可点歌</div>
      <div>唱播：刷一个大火箭可包场今晚主播任选歌曲</div>
      <div>守护等级达到某某某：</div>
      <div>ZM套餐/王者10局/点唱3收/录歌一首 四选一</div>
      <div>ZM套餐/王者10局/点唱3收/录歌一首 四选一</div>
      <div>ZM套餐/王者10局/点唱3收/录歌一首 四选一</div>
    </div>

    <template #footer>
      <el-button @click="handleClose">修改</el-button>
    </template>
  </el-dialog>
</template>

<script setup>
import { defineProps, defineEmits } from "vue";

defineProps({
  modelValue: {
    // 接收父组件v-model传值
    type: Boolean,
    default: false,
  },
});
const emit = defineEmits(["update:modelValue"]);
// 关闭对话框时通知父组件更新状态
const handleClose = () => {
  emit("update:modelValue", false);
};
</script>
<style lang="scss">
.notice_dialog {
  padding: 0;
  background-color: #222222;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  .pwd_input {
    margin-top: 20px;
    .el-input__wrapper {
      color: #fff;
      background: rgba(255, 255, 255, 0.5);
      border: none;
      box-shadow: none;
      .el-input__inner {
        // --el-input-placeholder-color: #fff;
        font-weight: 400;
        font-size: 14px;
        color: #ffffff !important;
        line-height: 24px;
        text-align: left;
        font-style: normal;
        text-transform: none;
      }
    }
    .el-input__suffix {
      cursor: pointer;
      height: 24px;
      font-family:
        Alibaba PuHuiTi 3,
        Alibaba PuHuiTi 30;
      font-weight: 400;
      font-size: 16px;
      color: #fe3f64;
      line-height: 24px;
      text-align: left;
      font-style: normal;
      text-transform: none;
    }
  }
  .locked_content {
    padding: 10px 20px 10px 20px;
    color: #fff;
    font-weight: 400;
    font-size: 14px;
    line-height: 24px;
    font-style: normal;
    text-transform: none;
    div {
      font-weight: 400;
      font-size: 14px;
      color: rgba(255, 255, 255, 0.8);
      line-height: 41px;
      text-align: left;
      font-style: normal;
      text-transform: none;
    }
  }
  .custom_header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: flex-start;
    align-items: center;
    color: #fff;
    line-height: 15px;
  }

  .el-dialog__header {
    border-bottom: 1px solid rgba(216, 216, 216, 0.5);
    padding: 20px 20px 10px 20px;
    height: 56px;

    .el-dialog__headerbtn {
      height: 56px;
    }
  }

  .search_div {
    width: 100%;

    .el-input__wrapper {
      width: 177px;
      height: 26px;
      border-radius: 166px 166px 166px 166px;
      border: 1px solid #ffffff;
      background: #222;
      color: #fff;
    }
  }

  .el-button {
    width: 68px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px 4px 4px 4px;

    span {
      font-weight: 400;
      font-size: 12px;
      color: #ff4e6c;
      line-height: 22px;
      text-align: left;
      font-style: normal;
      text-transform: none;
    }
  }

  .flex_out {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-content: center;
    align-items: center;
    margin-top: 17px;
  }

  .flex_inner {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: space-around;
    align-items: center;
  }

  .flex_date {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 400;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    font-style: normal;
    text-transform: none;
  }

  .infinite-list {
    height: 600px;
    width: 100%;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .infinite-list .infinite-list-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    margin: 30px 10px;

    .king_img {
      width: 32px;
      height: 23px;
    }

    .other_rank {
      display: inline-block;
      width: 32px;
      height: 23px;
      height: 14px;
      font-weight: 400;
      font-size: 14px;
      color: rgba(255, 255, 255, 0.85);
      line-height: 14px;
      text-align: center;
      font-style: normal;
      text-transform: none;
    }
  }

  .infinite-list .infinite-list-item + .list-item {
    margin-top: 10px;
    margin: 10px 6px;
  }

  .li_item {
    display: flex;
    align-items: stretch;
    justify-content: space-between !important;
    height: 3.125rem;
    /* background: var(--el-color-primary-light-9); */
    margin: 10px 0 10px 0 !important;
    align-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    width: 100%;

    img {
      width: 48px;
      height: 48px;
      border-radius: 50%;
    }

    .name_span {
      height: 17px;
      font-weight: 400;
      font-size: 14px;
      color: #ffffff;
      line-height: 16px;
      text-align: center;
      font-style: normal;
      text-transform: none;
    }

    .id_span {
      height: 17px;
      font-weight: 400;
      font-size: 12px;
      color: #ffffff;
      line-height: 16px;
      text-align: center;
      font-style: normal;
      text-transform: none;
    }

    .gift_count {
      margin-right: 20px;
      height: 17px;
      font-weight: 700;
      font-size: 16px;
      color: #ffffff;
      line-height: 16px;
      text-align: center;
      font-style: normal;
      text-transform: none;
    }
  }

  .el-dialog__footer {
    padding: 15px;
    border-top: 1px solid rgba(216, 216, 216, 0.5);
    .el-button {
      height: 30px;
    }
  }
}
</style>
